package com.guashu.liteflow.controller;

import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class FlowController {
    @Resource
    private FlowExecutor flowExecutor;
    @RequestMapping("/flow")
    @ResponseBody
    public void flow() {
        LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg-1");
    }
    @RequestMapping("/flow2")
    @ResponseBody
    public void flow2() {
        LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg-2");
    }
    @RequestMapping("/flow3")
    @ResponseBody
    public void flow3() {
        LiteflowResponse response = flowExecutor.execute2Resp("chain3", "arg-3");
    }
    @RequestMapping("/flow4")
    @ResponseBody
    public void flow4() {
        LiteflowResponse response = flowExecutor.execute2Resp("chain4", "arg-4");
    }
    @RequestMapping("/flow5")
    @ResponseBody
    public void flow5() {
        LiteflowResponse response = flowExecutor.execute2Resp("chain5", "arg-5");
    }
    @RequestMapping("/flow6")
    @ResponseBody
    public void flow6() {
        LiteflowResponse response = flowExecutor.execute2Resp("chain6", "arg-6");
    }
    @RequestMapping("/flow7")
    @ResponseBody
    public void flow7() {
        LiteflowResponse response = flowExecutor.execute2Resp("chain7", "arg-7");
    }
}
